# Contributor: Feng Shu <tumashu@163.com>

_realname=rime-prelude
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
         "${MINGW_PACKAGE_PREFIX}-librime-data")
pkgver=0.0.0.20190122
_commit=8a52b4f86a59f3eb602f9a4cf6a680a67c15df8c
pkgrel=1
pkgdesc="Essential files for building up your Rime configuration (mingw-w64)"
arch=('any')
url="https://github.com/rime/rime-prelude"
license=('LGPL')
source=("https://github.com/rime/rime-prelude/archive/$_commit/rime-prelude-$_commit.tar.gz")
sha512sums=('9d0c3a928956048f4864438a52f9f2e15525eb5c80128bae4a2fce1b2581d96d14090c4e5fd87b6ae22b38a3b73d7e3e66af6315a85241abd9422c2bc2f469c0')

eval "package_${MINGW_PACKAGE_PREFIX}-${_realname}() {
  cd rime-prelude-\$_commit
  install -Dm644 *.yaml -t \${pkgdir}\${MINGW_PREFIX}/share/rime-data/
}"

eval "package_${MINGW_PACKAGE_PREFIX}-librime-data() {
  pkgdesc='Meta package of preset librime data (mingw-w64)'
  depends=(${MINGW_PACKAGE_PREFIX}-rime-bopomofo
           ${MINGW_PACKAGE_PREFIX}-rime-cangjie
           ${MINGW_PACKAGE_PREFIX}-rime-essay
           ${MINGW_PACKAGE_PREFIX}-rime-luna-pinyin
           ${MINGW_PACKAGE_PREFIX}-rime-prelude
           ${MINGW_PACKAGE_PREFIX}-rime-stroke
           ${MINGW_PACKAGE_PREFIX}-rime-terra-pinyin)
}"
